package org.nfIt.h5user.controller;

import org.nfIt.h5user.service.SmsService;
import org.nfIt.vo.common.Result;
import org.nfIt.vo.common.ResultCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClossName:SmsController
 * Pakage:org.nfIt.h5user.controller
 * Description
 *
 *发送短信验证码
 *
 * @Author L
 * @Create 2024/9/25 19:58
 * @Version 2023.1.3
 */
@RestController
@RequestMapping("api/user/sms")
public class SmsController {

    @Autowired
    private SmsService smsService ;

    /**
     * 发送短信验证码
     * @param phone 手机号
     */
    @GetMapping(value = "/sendCode/{phone}")
    public Result sendValidateCode(@PathVariable String phone) {
        smsService.sendValidateCode(phone);
        return Result.build(null , ResultCodeEnum.SUCCESS) ;
    }



}
